﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace TC
{
    public class FlowGraph : Graph
    {
        public FlowGraph(Context context, Flow dispatcher) : base(context, dispatcher)
        {
        }

        public void Call<T>() where T : EventNode
        {
            Type eventType = typeof(T);
            foreach (var i in nodes)
            {
                if(i is T)
                {
                    dispatcher.Call(i as T);
                }
            }
        }
    }
}
